# Honor per-interactive-shell startup file
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi

# enable my vala profile with gtk+ 3
# if you put an export there, it'll not work...
GUIX_PROFILE="$HOME/.guix-extra-profiles/vala/vala" . "$GUIX_PROFILE/etc/profile"

# set up package config directories
export PKG_CONFIG_PATH="$HOME/.guix-profile/lib/pkgconfig:$HOME/.guix-profile/share/pkgconfig/"

export PATH="$PATH:$HOME/.emacs.d/bin"

# I should probably set up to log in to /dev/tty2 or 3 automatically and not tty1.
# tty1 is where debug output is generally sent.
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty2 ]]; then
    export MOZ_ENABLE_WAYLAND=1
    # below is how I used to use my custom channel without adding it to .config/guix/channels.scm
    # export GUIX_PACKAGE_PATH=/home/joshua/prog/gnu/guix/guix-packages/
    # this is how I use my custom code in my channel without adding my channel to .config/guix/channels.scm
    # and it still doesn't work
    export GUILE_LOAD_PATH=/home/joshua/prog/gnu/guix/guix-packages/:$GUILE_LOAD_PATH
    # export GUILE_LOAD_PATH=/home/joshua/prog/gnu/guix/rde:$GUILE_LOAD_PATH;
    export XDG_DATA_DIRS=/var/lib/flatpak/exports/share:/home/joshua/.local/share/flatpak/exports/share:$XDG_DATA_DIRS
    # this may fix a bug that I have with termite confusing backspace as space in guix environment
    # export TERM=linux
    # shepherd -c /home/joshua/.config/shepherd/init.scm &
    #exec dbus-run-session sway
    #export XDG_SESSION_TYPE=wayland
    #exec dbus-run-session gnome-session
    emacs
fi
